package com.epam.productstore.validation.rules;

import com.epam.productstore.util.ResourceManager;
import com.epam.productstore.validation.ValidationResult;

public class DateRule extends MaskRule{

	public DateRule() {
		super(ResourceManager.getProperty(ResourceManager.DATE_PATTERN));
	}
	
	public ValidationResult validate(String value){
		ValidationResult validationResult = super.validate(value);
		validationResult.setMessage(ResourceManager.getProperty(ResourceManager.INCORRECT_DATE_MESSAGE));
		return validationResult;		
	}

}
